import request from '@/utils/request'

// 根据会员id获取门店信息
export function getMemberStoreByMemberId(query) {
  return request({
    url: '/user/memberStore/getMemberStoreByMemberId',
    method: 'get',
    params: query
  })
}

// 分页查询 门店列表
export function pagingMemberStore(qurey) {
  return request({
    url: '/user/memberStore/pagingMemberStore',
    method: 'get',
    params: qurey
  })
}

// 删除
export function deleteStoreInfo(storeId) {
  return request({
    url: '/user/memberStore/deleteStoreInfo',
    method: 'get',
    params: { storeId }
  })
}

// 获取门店自定义配送范围所有经纬度
export function pagingAllAddressList(storeId) {
  return request({
    url: '/user/memberStore/pagingAllAddressList',
    method: 'get',
    params: { storeId }
  })
}

/**
 * 获取开通门店权限申请码
 * @param data
 */
export function getEnterpriseStoreApplyCode(data) {
  return request({
    url: '/user/memberStore/getEnterpriseStoreApplyCode',
    method: 'post',
    params: data
  })
}

// 更新门店状态
export function updataStoreState(memberId, storeState) {
  return request({
    url: '/user/memberStore/updataStoreState',
    method: 'post',
    params: { memberId, storeState }
  })
}

// 编辑微客门店（门店管理）信息
export function editStoreInfo(data) {
  return request({
    url: '/user/memberStore/doEditStoreInfo',
    method: 'post',
    data: data
  })
}

// 编辑编辑门店账号信息
export function editStoreAccountInfo(data) {
  return request({
    url: '/user/memberStore/editStoreAccountInfo',
    method: 'post',
    data: data
  })
}

// 获取门店业绩列表
export function statisticsStoreAchievement(qurey) {
  return request({
    url: '/user/memberStore/statisticsStoreAchievement',
    method: 'get',
    params: qurey
  })
}

// 获取门店业绩列表
export function statisticsStoreNum(qurey) {
  return request({
    url: '/user/memberStore/statisticsStoreNum',
    method: 'get',
    params: qurey
  })
}

